<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:o="http://openfaces.org/">

    <ui:composition template="/template.xhtml">
        <ui:define name="body">
            <h:form>
                <h:outputText value="#{bundle.CreateUserTitle}" styleClass="titulo"></h:outputText>
                <br/>
                <h:panelGrid columns="3" styleClass="panel">
                    <h:outputLabel value="#{bundle.EditUserLabel_userID}" for="userID" />
                    <h:inputText id="userID" value="#{userController.selected.userID}"
                                 title="#{bundle.EditUserTitle_userID}" 
                                 required="#{userController.campoNulo('userID')}" 
                                 requiredMessage="#{bundle.EditUserRequiredMessage_userID}"
                                 size="#{userController.longCampo('userID')}"
                                 maxlength="#{userController.longCampo('userID')}"/>
                    <h:message for="userID" errorStyle="color: red" infoStyle="color: green"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_userName}" for="userName" />
                    <h:inputText id="userName" value="#{userController.selected.userName}"
                                 title="#{bundle.EditUserTitle_userName}" 
                                 required="#{userController.campoNulo('userName')}" 
                                 requiredMessage="#{bundle.EditUserRequiredMessage_userName}"
                                 size="#{userController.longCampo('userName')}"
                                 maxlength="#{userController.longCampo('userName')}"/>
                    <h:message for="userName" errorStyle="color: red" infoStyle="color: green"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_userIdent}" for="userIdent" />
                    <h:inputText id="userIdent" value="#{userController.selected.userIdent}"
                                 title="#{bundle.EditUserTitle_userIdent}" 
                                 required="#{userController.campoNulo('userIdent')}" 
                                 requiredMessage="#{bundle.EditUserRequiredMessage_userIdent}"
                                 size="#{userController.longCampo('userIdent')}"
                                 maxlength="#{userController.longCampo('userIdent')}"/>
                    <h:message for="userIdent" errorStyle="color: red" infoStyle="color: green"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_userPwd}" for="userPwd" />
                    <h:inputText id="userPwd" value="#{userController.selected.userPwd}"
                                 title="#{bundle.EditUserTitle_userPwd}" 
                                 required="#{userController.campoNulo('userPwd')}" 
                                 requiredMessage="#{bundle.EditUserRequiredMessage_userPwd}"
                                 size="#{userController.longCampo('userPwd')}"
                                 maxlength="#{userController.longCampo('userPwd')}"/>
                    <h:message for="userPwd" errorStyle="color: red" infoStyle="color: green"/>
                    <h:outputLabel value="#{bundle.EditUserLabel_userEmail}" for="userEmail" />
                    <h:inputText id="userEmail" value="#{userController.selected.userEmail}"
                                 title="#{bundle.EditUserTitle_userEmail}" 
                                 required="#{userController.campoNulo('userEmail')}" 
                                 requiredMessage="#{bundle.EditUserRequiredMessage_userEmail}"
                                 size="#{userController.longCampo('userEmail')}"
                                 maxlength="#{userController.longCampo('userEmail')}"/>
                    <h:message for="userEmail" errorStyle="color: red" infoStyle="color: green"/>
                </h:panelGrid>
                <br />
                <h:commandButton action="#{userController.create}" value="Aceptar"/>
                <h:commandButton action="#{userController.prepareList}" value="Cancelar" immediate="true"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
